/*
 *  Locust.h
 *  pr1
 *
 *  Created by Javier Quevedo on 25/01/09.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */


#import "Node.h"
#import "Model.h"
#if defined(WIN32)
#include <GL/glut.h>
#else
#include <GLUT/glut.h>
#endif

typedef enum LocustState {
	LS_Walk = 0,
	LS_Jump = 1,
	LS_Lay = 2,
	LS_Stop = 3
} LocustState;

typedef struct Locust {
	Node *main;
	Node *antennae;
	Node *body;
	Node *eyes;
	Node *head;
	Node *backLeftLowerLeg;
	Node *backLeftUpperLeg;
	Node *backRightLowerLeg;
	Node *backRightUpperLeg;
	Node *frontLeftLeg;
	Node *frontRightleg;
	Node *middleLeftLeg;
	Node *middleRightLeg;
	Node *mouth;
	
	GLfloat position[3];
	GLfloat velocity[3];
	GLfloat acceleration[3];
	GLfloat size[3];
	
	char **files;
	Model *model;
	enum LocustState state;
}Locust;


Locust* initLocust();
void releaseLocust(Locust *_locust);
void setLocustSize(Locust *Locust, GLfloat _locustSize);